import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import Page4 from './views/nav2/Page4.vue'
import Page5 from './views/nav2/Page5.vue'
import Page6 from './views/nav3/Page6.vue'
import echarts from './views/charts/echarts.vue'
import TableList from './views/tab/TableList.vue'
import depList from './views/tab/depList.vue'
import Permission from './views/tab/Permission.vue'
import Role from "./views/tab/Role.vue";
import shopRegister from "./views/tab/shopRegister.vue";
import carType from "./views/car/carType.vue";
import Car from "./views/car/Car.vue";
import Examine from "./views/examine/Examine.vue";
import Book from "./views/nav2/Book.vue";



let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },

    {
        path: '/',
        component: Home,
        name: '首页',
        // 一级菜单 leaf:true,   没有的就是多级菜单
        leaf:true,
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/echarts', component: echarts, name: '首页' },
            // { path: '/shopRegister', component: shopRegister, name: '商家入驻' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '商家入驻',
        // 一级菜单 leaf:true,   没有的就是多级菜单
        leaf:true,
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/shopRegister', component: shopRegister, name: '商家入驻' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '汽车之家',
        // 一级菜单 leaf:true,   没有的就是多级菜单
        // leaf:true,
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/Car', component: Car, name: '商城' },
            { path: '/carType', component: carType, name: '二手车' }
        ]
    },



    // 员工列表
    {
        path: '/',
        component: Home,
        name: '列表',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            //  hidden: true  隐藏此菜单  path路径    component组件
            { path: '/tablelist', component: TableList, name: '列表', hidden: true },
            { path: '/TableList', component: TableList, name: '员工列表' },
            { path: '/deplist', component: depList, name: '部门列表' },
        ]
    },

    // 权限管理
    {
        path: '/',
        component: Home,
        name: '管理',
        // 一级菜单 leaf:true,   没有的就是多级菜单
        leaf:false,
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/examine', component: Examine, name: '审核' },
            { path: '/permission', component: Permission, name: '权限管理' },
            { path: '/role', component: Role, name: '角色管理' }
        ]
    },

    // 角色管理
    // {
    //     path: '/',
    //     component: Home,
    //     name: '权限管理',
    //     // 一级菜单 leaf:true,   没有的就是多级菜单
    //     leaf:true,
    //     iconCls: 'fa fa-bar-chart',
    //     children: [
    //
    //     ]
    // },




    {
        path: '/',
        component: Home,
        name: '导航一',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/main', component: Main, name: '主页', hidden: true },
            { path: '/table', component: Table, name: 'Table' },
            { path: '/form', component: Form, name: 'Form' },
            { path: '/user', component: user, name: '列表' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: 'Book',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/book', component: Book, name: 'Book' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: 'Excel表格',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/page4', component: Page4, name: '页面4' },
            { path: '/page5', component: Page5, name: 'Excel' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'fa fa-address-card',
        leaf: true,//只有一个节点
        children: [
            { path: '/page6', component: Page6, name: '导航三' }
        ]
    },

    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;
